<?php
require_once('../includes/frameworkajax.php');
$cd_contabancaria =  @$_POST["cd_contabancaria"];
$sql= " select trim(to_char(coalesce(tethys.saldo_anterior(".$cd_contabancaria."),0),'R$99G999D99')) as saldo_anterior";
//echo($sql);
$rs = Connection::query($sql);
$row = $rs->fetch();

echo json_encode($row);
?>